package com.heart.sell.exception;

import com.heart.sell.enums.ResponseCodeEnum;
import lombok.Getter;

/**
 * @author Luo Zhen
 * @create 2019-04-23 16:27
 */
@Getter
public class SellException extends RuntimeException {

    private Integer code;

    public SellException(ResponseCodeEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public SellException(Integer code, String message) {
        super(message);
        this.code = code;
    }
}
